import { commonTableOptions } from '@/utils/util'

export const tableOption = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 6,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: true,
    searchLabelWidth: 120,
    column: [
      {
        label: '公司名称',
        search: true,
        prop: 'p2',
      },
      {
        label: '船舶名称',
        prop: 'p3',
      },
      {
        label: '海事机构',
        prop: 'p1',
        search: true,
        type: 'select',
        dicData: [
          {label:'南京海事局', value:'南京海事局'},
          {label:'扬州海事局', value:'扬州海事局'},
          {label:'南通海事局', value:'南通海事局'},
        ],
      },
      {
        label: '年度',
        prop: 'p4',
        search: true,
      },
    ]
  }
}

export const tableOption2 = function () {
  let self = this
  return {
    ...commonTableOptions,
    // height: self?.documentHeight - 450,
    searchMenuSpan: 12,
    menuWidth: 300,
    menu: true,
    header: true,
    addBtn: false,
    addBtnText: '新增',
    editBtn: false,
    delBtn: false,
    viewBtn: false,
    searchLabelWidth: 120,
    cellBtn: true,
    addRowBtn: true,
    editRowBtn: true,
    column: [
      {
        label: '问题描述',
        prop: 'p1',
        cell: true,
      },
    ]
  }
}